package at.xne.dojosui

class DojoxTagLib {
	static namespace ="dsui"
	
	def imageLigthbox = { attrs,body ->
		//TODO-NE add diashow feature
		//TODO-NE idea for additional serverside thumbnailfeature. parameter is the original image and de size and it will be resized by the plugin
			out << """<a dojoType="dojox.image.Lightbox" id="${attrs['id']}" title="${attrs['title']}" href="${attrs['img']}">"""
			out << """<img id="${attrs['id']}" src="${attrs['thumbnail']}" title="${attrs['title']}"/>"""
			out << """</a>"""
				
		}
	
	def dataGrid = { attrs, body ->
		//TODO-NE idea add default params attrs to something like clientSort... 
		out << """<div dojoType="dojo.data.ItemFileReadStore" jsId="${attrs['id']}" url="${attrs['url']}"></div>"""
		out << """<table id="${attrs['id']}" dojoType="dojox.grid.DataGrid" store="${attrs['id']}" query="{id: '*'}" clientSort="true">"""
		out << """<thead><tr>${body()}</tr></thead></table>"""
		

		
		
		
		
	}
}
